﻿using System;
using System.Collections.Generic;

namespace Search
{
    public class SequentialSearch : ISearch
    {
        public int Perform<T>(IList<T> list, T value) where T : IComparable<T>
        {
            for (int index = 0; index < list.Count; index++)
            {
                if (list[index].CompareTo(value) == 0)
                {
                    return index;
                }
            }
            return -1;
        }
    }
}
